<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    {{ testObj.word }}
		<br>
		<input v-model="testObj.word" />
		<br>
    {{ lastName }}
    <div>依然范特西</div>
    <button onclick="handleChange()">改变句子</button>
  </div>
  <script type="module" src="./js/index.js"></script>
  <script>
    let vm
    setTimeout(() => {
      
      vm = new Vue({
        el: '#app',
        data: {
					testObj: {
					  word: 'hello'
					},
          lastName: 'Zhou'
        },
        watch: {
          lastName() {
            console.log('lastName改变了o')
          }
        }
      })

    }, 200)

    function handleChange() {
      vm.lastName = 'Hi'
			vm.testObj.word = 1
			console.log(vm)
    }
    
  </script>
</body>

</html>